<?php
include_once($_SERVER['DOCUMENT_ROOT']."/config.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/collect/Lib/ORG/Mycurl.class.php");
include_once($_SERVER['DOCUMENT_ROOT']."/collect/Common/yzs1013_pldr.php");
$_REQUEST['o']=safe($_REQUEST['o']);
if($_REQUEST['save']&&$_REQUEST['content']!=""){
    $data['content']=$_REQUEST['content'];
    $data['name']=$_REQUEST['o'];
    $id=insertupdate("longzs_help",$data,"select * from longzs_help where name='{$_REQUEST['o']}'");
}
$rs=query("select * from longzs_help where `name`='{$_REQUEST['o']}'")[0];
?><!doctype html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8" http-equiv="X-UA-Compatible" content="IE=Edge">
    <script type="text/javascript" src="/js/jquery-3.2.1.min.js"></script>
    <title>字串工具</title>
    <style>
        textarea {
            width: 940px;
            height: 236px;
            margin: 10px;
            padding: 10px;
            background: #0000ff8c;
            color: #fff;
        }
        input{
            margin: 0 10px;
        }
    </style>
    <script>
        $(document).ready(function(){
            if(/yzs1013/.test(top.location)){
                $("input[name=save]").show();
            }
        })
    </script>
</head>
<body>
<iframe name="ifr" id="ifr" style="display: none"></iframe>
    <form method="POST" name="myform" action="help.php">
        <textarea name="content" id="content"><?php echo $rs['content'];?></textarea>
        <input type="hidden" name="o" value="<?php echo $_REQUEST['o'];?>">
        <input type="submit" name="save" value="保存" style="display: none">
    </form>
</body>
</html>
